package com.kuang.service;

import com.kuang.dao.SaleMapper;
import com.kuang.pojo.Return;
import com.kuang.pojo.Sale;

import java.util.List;

public class SaleServiceImpl implements SaleService {
private SaleMapper saleMapper;

    public void setSaleMapper(SaleMapper saleMapper) {
        this.saleMapper = saleMapper;
    }

    @Override
    public List<Sale> getSale() {

        return saleMapper.getSale();
    }

    @Override
    public int addSale(Sale sale) {
        return saleMapper.addSale(sale);
    }

    @Override
    public Sale getSaleById(String id) {
        return saleMapper.getSaleById(id);
    }

    @Override
    public int updateSale(Sale sale) {
        return saleMapper.updateSale(sale);
    }

    @Override
    public int deleteSale(String id) {
        return saleMapper.deleteSale(id);
        
    }

    @Override
    public List<Sale> getSaleByDate(String date) {
        return saleMapper.getSaleByDate(date);
    }

    @Override
    public List<Sale> getSqlByname(String name) {
        return saleMapper.getSqlByname(name);
    }

    @Override
    public Sale getnumberByname(String name) {
        return saleMapper.getnumberByname(name);
    }
}
